/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bd2_xml.persistencia;

import java.io.IOException;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author comp1
 */
public class Deletar {
    
    public static boolean dropTabela(String tabela){
        Connection conn = null;
        boolean teste = false;
        try {
            conn = Conexao.getConnection();
        } catch (IOException ex) {
            Logger.getLogger(Selecionar.class.getName()).log(Level.SEVERE, null, ex);
        }
        try {
            conn.createStatement().execute("DROP TABLE "+tabela+"");
            teste = true;
        } catch (SQLException ex) {            
            Logger.getLogger(Selecionar.class.getName()).log(Level.SEVERE, null, ex);
        }
        return teste;
    }
    
}
